<div id="tags">
<p>
  <h1>Entries with tag <b><u><%=h @tag.tag %></u></b>:</h1>
</p>
<% i = 0 %>
<%@e = Entry.find(:all)%>
<%for entry in @e%>
    <%@bool = 0%>
    <%for tag in entry.tags%>
     <%if tag.tag == @tag.tag%>
             
            <%@bool = 1%>
        <%end%>
    <%end%>
    <%if @bool == 1%>
        <%= render :partial => "entries/entrybox", :locals => { :entry => entry } %>
    <%end%>
<%end%>
<p>
<%= link_to 'Back to entry', entry_path(@entry) %>
</p>
</div>